package com.sali.asyncollection.service.impl.strategy.method6.listener;



import com.sali.asyncollection.service.impl.strategy.method6.event.OrderEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class OrderScoreGetListener implements ApplicationListener<OrderEvent> {


    @Override
    @Async
    public void onApplicationEvent(OrderEvent event) {
        log.info("赠送积分成功，用户是：{}", event.getUserId());
    }
}
